package com.jiazhong.spring.autowired.service;


import com.jiazhong.spring.autowired.dao.UserDao;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @Auther:shuXin
 */
@Service("userService")
public class UserServiceImpl implements UserService{

    //@Autowired
    /*public UserServiceImpl(@Autowired UserDao userDao) {
        this.userDao = userDao;
    }*/

    //@Resource(name = "userDao")
    //@Qualifier("userDaoRedisImpl")
    @Resource
    private UserDao userDao;

    //@Autowired
    /*public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }*/

    @Override
    public void save() {
        userDao.save();
        System.out.println("service方法中的save被执行");
    }
}
